{include file="public/head"}

<body>
<div id="wrapper">
    {include file="public/menu"}

    <div id="page-wrapper" class="gray-bg dashbard-1">
        {include file="public/nav"}
        <div class="row wrapper border-bottom white-bg page-heading">
            <div class="col-lg-10">
                <h2>订单信息</h2>
                <ol class="breadcrumb">
                    <li>
                        <a href="{:url('Index/index')}">主页</a>
                    </li>
                    <li>
                        <a>订单</a>
                    </li>
                    <li>
                        <strong>订单列表</strong>
                    </li>
                </ol>
            </div>
            <div class="col-lg-2">

            </div>
        </div>
        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>订单信息列表</h5>
                            <div class="ibox-tools">
                                <small>共 {$Count} 条</small>
                            </div>
                        </div>

                        <div class="ibox-content">
                            <form method="get" action="{:url('Order/OrderList')}">
                                <div class="row">
                                    <div class="col-sm-3 m-b-xs">
                                        <div class="row">
                                            <div class="col-sm-3 m-b-xs">订单编号</div>
                                            <div class="col-sm-7 m-b-xs">
                                                <input type="text" class="input-sm form-control input-s-sm inline" id="order_id" name="order_id" value="{$Data.order_id|default=''}">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-3 m-b-xs"></div>
                                    <div class="col-sm-3 m-b-xs"></div>
                                    <div class="col-sm-3 m-b-xs">
                                        <div class="row">
                                            <div class="col-sm-10 m-b-xs text-right">
                                                <button class="btn btn-sm btn-primary" type="submit" id="search"><i class="fa fa-search"></i> 搜索</button>
                                                <button class="btn btn-sm btn-success" type="submit" id="export">导出Excel</button>
                                            </div>
                                            <div class="col-sm-2 m-b-xs"></div>
                                        </div>
                                    </div>
                                </div>
                            </form>
                            <div class="table-responsive">
                                <table class="table table-hover">
                                    <thead>
                                    <tr>
                                        <th>详情</th>
                                        <th>时间</th>
                                        <th>订单编号</th>
                                        <th>总支付</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {volist name="OrderList" id="v"}
                                    <tr>
                                        <td><a href="{:url('OrderDetail')}?id={$v.id}" class="btn btn-xs btn-primary">明细</a></td>
                                        <td>{$v.pay_time|date='Y-m-d H:i:s',###}</td>
                                        <td>{$v.order_id}</td>
                                        <td>{$v.pay_amount} USDT</td>
                                    </tr>
                                    {/volist}
                                    </tbody>
                                </table>
                            </div>
                            <div class="row" style="text-align: center">
                                {$Page}
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
        {include file="public/foot"}
    </div>
</div>
</div>
{include file="public/footer"}
<script>
    /*条件搜索*/
    var searchurl = "{:url('Order/OrderList')}";
    $('#search').click(function () {

        $('form').attr('action',searchurl);
    });


    /*Excel导出*/
    var exporturl = "{:url('Order/OrderExport')}";
    $('#export').click(function () {
        $('form').attr('action',exporturl);
    });


    /*订单-删除*/
    function order_del(obj,id){
        layer.confirm('确认要删除吗？',function(index){
            $.ajax({
                type:"post",
                url:"{:url('Order/OrderDelete')}",
                data:{
                    id:id,
                },
                dataType:"json",
                success:function(data){
                    if(data.status == 1){
                        layer.msg(data.message,{icon: 6,time:3000},function () {
                            window.location.reload();
                        });
                    }else{
                        layer.msg(data.message,{icon: 5,time:3000});
                    }
                }
            });
        });
    }


</script>
</body>
</html>
